<template>
  <div class="drivingSchoolItem">
    <div class="drivingSchoolItem_left">
      <div class="imgBox">
        <nuxt-link
          :to="{
            name: 'coach-coachDetails-id',
            query: { coachId: coachitem.coach_id },
          }"
        >
          <img :src="coachitem.head_img" alt="" />
        </nuxt-link>
      </div>
      <div class="midText">
        <nuxt-link
          :to="{
            name: 'coach-coachDetails-id',
            query: { coachId: coachitem.coach_id },
          }"
        >
          <div class="midText_top">
            <span class="titleColor curp">{{ coachitem.name }}</span>
            <span class="drivingyear">{{ coachitem.drive_age }}年驾龄</span>
            <img src="~/assets/images/schoolTitle.png" alt="" style="margin-left:12px" />
             <img src="~/assets/images/tuijian.png" alt=""  style="width:48px;height:20px;margin-left:12px"  v-if="coachitem.is_recommend==1"/>
          </div>
        </nuxt-link>
        <div class="midText_mid">
          <span class="tips"> 好评率 <span class="addColor">98%</span> </span>
          <span class="tips">
            学员数量：
            <span class="addColor">{{ coachitem.ccCount }}人</span>
          </span>
          <span class="tips">
            教龄：
            <span class="addColor">{{ coachitem.drive_age }}年</span>
          </span>
        </div>

        <span class="school">
          {{ coachitem.coachAddr }}
        </span>
      </div>
    </div>
    <div class="drivingSchoolItem_right">
      <span class="money">{{ iscoach?coachitem.pCost:coachitem.cPrice }}</span>
      <el-button type="primary">免费咨询</el-button>
    </div>
  </div>
</template>
<script>
export default {
  components: {},
  props: {
    coachitem: {
      type: Object,
      default: () => {
        return {};
      },
    },
    iscoach: {
      type: Boolean,
      default:true,
    },
  },
  data() {
    return {};
  },
  methods: {},
};
</script>

<style scoped lang='scss'>
.drivingSchoolItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 30px;
  .drivingSchoolItem_left {
    display: flex;
    //   align-items: center;
  }
  .imgBox {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
    img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
  .midText {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    color: #6d6d6d;
    .midText_top {
      display: flex;
      align-items: center;
      margin-bottom: 8px;
      .titleColor {
        font-size: 18px;
        color: #0b0c0f;
      }
      .drivingyear {
        font-size: 14px;
        color: #449bff;
        margin-left: 8px;
      }
    }
    .tips {
      font-size: 14px;
      color: #6d6d6d;
      .addColor {
        color: #feb31e;
      }
      margin-right: 26px;
    }
    .school {
      margin-top: 6px;
      font-size: 12px;
    }
    .starTextBox {
      //   margin-top: 6px;
      display: flex;
      align-items: center;
      .starBox {
        display: flex;
        align-items: center;
        img {
          margin-right: 6px;
        }
      }
      .tips {
        margin-right: 15px;
        color: #dbdbdb;
      }
      .people {
        display: flex;
        align-items: center;
        img {
          margin-right: 5px;
        }
      }
    }
  }
  .drivingSchoolItem_right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    .money {
      font-size: 24px;
      color: #ff6054;
      font-weight: bold;
      margin-right: 48px;
    }
  }
}
</style>